Explore the first two principle component along with info

This helps to graphically illustrate the geodesic searching algorithm

Explore the first two principle component along with method

It doesn’t seem that the polishing seraching is very efficient - the space is too large. We could color by alpha in the polish to see it better.

Explore the first two principle component along with alpha

We can indeed see that an init of 0.5 for alpha is too big and unnecessary. What about the projection distant between the last two target basis in the search geodesic? Their distance is only 0.02! Filter for alpha < 0.02

last_two <- holes_1d_geo %>% filter(info == "best_line_search") %>% tail(2) %>% pull(basis)
last_two_dist <- tourr::proj_dist(last_two[[1]], last_two[[2]])
last_two_dist
## [1] 0.02352634

## # A tibble: 4 x 3
##   index_val  alpha  loop
##       <dbl>  <dbl> <dbl>
## 1     0.933 0.0497    10
## 2     0.933 0.0298    12
## 3     0.933 0.0169    14
## 4     0.933 0.0169    15

Conclusion

This flow of analysis shows that an init value of 0.5 for alpha is not ideal. A value based on the distance of the last two target basis would be a better option.

Explore the first two principle component along with index_val

The problem of mapping index_val to color is that human eyes can only preceive the cahnge of index_val, but not its magnitude. We can’t see how fast it increases! That’s why I think it is indeed necessary to create a 3D plot, but just to make the plot fancy but because both the principal compoennt and index_val need to be mapped to axis for us to preceive the changes.

Haven’t seen an option to do 3D graph in ggplot - the best I can find is plotly. Now it feels much like a hill climbing. tries 12, the last tries is not doing that good tho. The largest improvement happens around tries = 7/8.

A 2D example

We did the PCA for both columns and take the first PC of both. Again, mapping index_val to color doesn’t show much info.

Using plotly, we can preceive the changes better - there seems to be a local optimum somewhere and an only way to get to the higher hill.

Filter only the interpolation points and repeat the process again, this time we can see much more. The searching gets a bit stucked at index_val between 0.85 - 0.9 and then proceeds to the upper hill.